import { IMessageBase } from "../../Framework/MQ/IMessageBase";
import { MessageManager } from "../../Framework/MQ/MessageManager";
import { SerializeStream } from "../../Framework/Serialize/SerializeStream";
type int = number;
//class SPlayer
    
    export  class SPlayer extends IMessageBase
    {
        constructor(arg1: Boolean=false)
        {
            
            super();if (arg1) 
            {
                MessageManager.instance().regist(this);
            }
            return;
        }

        public /* override */ getType(): int
        {
            return this._type;
        }

        public /* override */ clone(): IMessageBase
        {
            return new SPlayer();
        }

        public /* override */ __write(arg1: SerializeStream): void
        {
            arg1.writeInt(this.playerId);
            arg1.writeString(this.username);
            arg1.writeString(this.name);
            arg1.writeInt(this.sex);
            arg1.writeInt(this.camp);
            arg1.writeDate(this.createDt);
            arg1.writeInt(this.flag);
            arg1.writeInt(this.mode);
            arg1.writeInt(this.status);
            arg1.writeInt(this.photo);
            arg1.writeInt(this.issm);
            arg1.writeByte(this.VIP);
            arg1.writeDate(this.lastLoginDt);
            arg1.writeInt(this.onlineDays);
            arg1.writeInt(this.onlineTime);
            arg1.writeInt(this.offlineTime);
            arg1.writeInt(this.avatar);
            arg1.writeInt(this.reserve1);
            arg1.writeInt(this.reserve2);
            return;
        }

        public /* override */ __read(arg1: SerializeStream): void
        {
            this.playerId = arg1.readInt();
            this.username = arg1.readString();
            this.name = arg1.readString();
            this.sex = arg1.readInt();
            this.camp = arg1.readInt();
            this.createDt = arg1.readDate();
            this.flag = arg1.readInt();
            this.mode = arg1.readInt();
            this.status = arg1.readInt();
            this.photo = arg1.readInt();
            this.issm = arg1.readInt();
            this.VIP = arg1.readByte();
            this.lastLoginDt = arg1.readDate();
            this.onlineDays = arg1.readInt();
            this.onlineTime = arg1.readInt();
            this.offlineTime = arg1.readInt();
            this.avatar = arg1.readInt();
            this.reserve1 = arg1.readInt();
            this.reserve2 = arg1.readInt();
            return;
        }

        public /* const */_type: int=12004;

        public /* var */playerId: int;

        public /* var */username: string;

        public /* var */name: string;

        public /* var */sex: int;

        public /* var */camp: int;

        public /* var */createDt: Date;

        public /* var */flag: int;

        public /* var */mode: int;

        public /* var */status: int;

        public /* var */photo: int;

        public /* var */issm: int;

        public /* var */VIP: int;

        public /* var */lastLoginDt: Date;

        public /* var */onlineDays: int;

        public /* var */onlineTime: int;

        public /* var */offlineTime: int;

        public /* var */avatar: int;

        public /* var */reserve1: int;

        public /* var */reserve2: int;

        public static /* var */_regist: SPlayer;
    }

            SPlayer._regist = new SPlayer(true);
        